package com.gite.nouette.admin.implementation.model;

import java.util.List;

import com.gite.nouette.admin.contract.model.ICommand;
import com.gite.nouette.admin.contract.model.IContainerModule;
import com.gite.nouette.admin.contract.model.IHandlerModule;
import com.gite.nouette.admin.contract.model.IManager;
import com.gite.nouette.admin.contract.model.IModule;
import com.gite.nouette.admin.contract.model.IPair;

public class ManagerImpl extends AbstractModel implements IManager {
	private IHandlerModule handlerModule = null;
	private IContainerModule containerModule = null;

	@Override
	public IHandlerModule getHandlerModule() {
		return this.handlerModule;
	}

	@Override
	public void setHandlerModule(IHandlerModule handlerModule) {
		this.handlerModule = handlerModule;
	}

	@Override
	public IContainerModule getContainerModule() {
		return this.containerModule;
	}

	@Override
	public void setContainerModule(IContainerModule containerModule) {
		this.containerModule = containerModule;
	}

	@Override
	public boolean addCommand(ICommand command) {
		return getHandlerModule().addCommand(command);
	}

	@Override
	public boolean removeCommmand(ICommand command) {
		return getHandlerModule().removeCommand(command);
	}

	@Override
	public void addColumn(int index) {
		getContainerModule().addColumn(index);
	}

	@Override
	public List<IModule> removeColumn(int index) {
		return getContainerModule().removeColumn(index);
	}

	@Override
	public int getNbColumn() {
		return getContainerModule().getNbColumn();
	}

	@Override
	public int getNextIndexColumn() {
		return getContainerModule().getNextIndexColumn();
	}

	@Override
	public IPair<Integer, Integer> addModule(IModule module) {
		return getContainerModule().addModule(module);
	}

	@Override
	public int addModule(IModule module, int colNum) {
		return getContainerModule().addModule(module, colNum);
	}

	@Override
	public void addModule(IModule module, int colNum, int rowNum) {
		getContainerModule().addModule(module, colNum, rowNum);
	}

	@Override
	public boolean removeModule(IModule module) {
		return getContainerModule().removeModule(module);
	}

	@Override
	public int getNbModule() {
		return getContainerModule().getNbModule();
	}
}
